<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="/wondershare/js/jquery.js"></script> 
<script src="/wondershare/js/task.js"></script>
<link href="/wondershare/styles/main.css" rel="stylesheet" type="text/css" />
<link href="/wondershare/styles/general.css" rel="stylesheet" type="text/css" />
</head>
<body >
<h1>
    <span id="search_id" class="action-span1"> 任务处理 </span>
    <div style="clear:both"></div>
</h1>
<div id="tabbody-div"  style=" width:1100px;">
    <form  name="theForm" method="post" action="/wondershare/task_manage.php?action=editSubmit" onsubmit="return checkSubmit();">
        <table align="center" width="90%" id="general-table">
        <tbody>
            <tr>
                <td class="label">任务名称：</td>
                <td>
                    <textarea cols="60" rows="4"  name="Name" id="Name" <{if $type != 'self' && $type != 'admin' }> 
                    disabled="disabled"  <{/if}> ><{$manage_rows.mName|escape}></textarea>
                </td>
            </tr>
            <tr>
                <td class="label">任务状态：</td>
                <td>
                    <span class="require-field">
                        <{if $manage_rows.mState == 4 }> 
                            已完成
                        <{elseif $manage_rows.mState == 3 }> 
                            待发布
                        <{elseif $manage_rows.mState == 2 }> 
                            测试失败
                        <{elseif $manage_rows.mState == 1 }> 
                            测试中
                        <{elseif $manage_rows.mState == 0 }> 
                            未测试
                        <{/if}>
                    </span>
                </td>
            </tr>
             <tr>
                <td class="label">任务是否FTP：</td>
                <td>
                    <span class="require-field">
                        <{if $manage_rows.mIsFtp == 0 }> 
                            否
                        <{elseif $manage_rows.mIsFtp == 1 }> 
                        	是
                        <{/if}>
                    </span>
                </td>
            </tr>
            
            <tr>
                <td class="label">发布更新文件：</td>
                <td>
                   <a href="/wondershare/task_manage.php?action=showFileList&&type=<{$type}>&file_name=<{$manage_rows.mEditFile|escape}>&is_cdn=0">	
                   <{$manage_rows.mEditFile|escape}></a>
                </td>
            </tr> 
            <tr>
                <td class="label">发布删除文件：</td>
                <td>
                   <a href="/wondershare/task_manage.php?action=showFileList&&type=<{$type}>&file_name=<{$manage_rows.mDeleteFile|escape}>&is_cdn=0"> 
                   <{$manage_rows.mDeleteFile|escape}></a>
                </td>
            </tr>
            <tr>
                <td class="label">CDN推送更新文件：</td>
                <td>
                   <a href="/wondershare/task_manage.php?action=showFileList&&type=<{$type}>&file_name=<{$manage_rows.mCdnEditFile|escape}>&is_cdn=1">
                   <{$manage_rows.mCdnEditFile|escape}></a>
                </td>
            </tr> 
            <tr>
                <td class="label">CDN推送删除文件：</td>
                <td>
                   <a href="/wondershare/task_manage.php?action=showFileList&&type=<{$type}>&file_name=<{$manage_rows.mCdnDeleteFile|escape}>&is_cdn=1">
                    <{$manage_rows.mCdnDeleteFile|escape}></a>
                </td>
            </tr>
             <tr>
                <td class="label">发布时信息日记文：</td>
                <td>
                   <a href="/wondershare/task_manage.php?action=showFileList&&type=<{$type}>&file_name=<{$manage_rows.mMsgFile|escape}>&is_cdn=0&is_msg=1">
                    <{$manage_rows.mMsgFile|escape}></a>
                </td>
            </tr>
            
            <tr> <!-- pkjueying -->
                <td class="label">CDN推送日记文：</td>
                <td>
                   <a href="/wondershare/task_manage.php?action=showFileList&&type=<{$type}>&file_name=<{$manage_rows.mCdnMsgFile|escape}>&is_cdn=0&is_msg=1">
                    <{$manage_rows.mCdnMsgFile|escape}></a>
                </td>
            </tr>
            
            <tr>
                <td class="label">任务所属域名：</td>
                <td>
                    <select name="sId"   disabled="disabled"  style="width:450px;" >
                    <{$site_option}>
                    </select>
        
                </td>
            </tr>
            <tr>
                <td class="label">任务描述：</td>
                <td>
                
                    <textarea cols="60" rows="6" id="Description" name="Description" 
                    <{if $type != 'self' && $type != 'admin' }> disabled="disabled"  <{/if}>><{$manage_rows.mDescription|escape}></textarea>
                    
                </td>
            </tr>  
             <{if $type == 'self' && ( $manage_rows.mState == 0 || $manage_rows.mState == 2 ) }> 
                <tr>
                    <td class="label">选择测试人：</td>
                    <td>
                        <select name="TestAid" style="width:450px;" >
                        <{$size_user_option}>
                        </select>
                    </td>
                   
                </tr>
             <{elseif $type == 'test' && $manage_rows.mState == 1 }> 
           		 <tr>
                    <td class="label">选择发布人：</td>
                    <td>
                        <select name="PubAid"  id="PubAid" style="width:300px;">
                        <{$size_user_option}>
                        </select>
                        <input type="button"   class="button" value="确认发布人 " name="sub1" id='sub1' 
                    onclick="updateTaskState(<{$manage_rows.mId}>, 3, '<{$type|escape}>');" />
                    </td>
                    

                </tr>
                
                 <tr>
                    <td class="label">测试失败操作：</td>
                    <td>
                       <input type="button"   style="margin-left:20px;" class="button" value="测试失败 " name="sub" id='sub' 
                    onclick="updateTaskState(<{$manage_rows.mId}>, 2, '<{$type|escape}>');" />
                    </td>
    			 </tr>
             <{elseif $type == 'pub' && $manage_rows.mState == 3 }> 
           		 <tr>
                 	<td class="label">是否发布完成：</td>
                    <td>
                    <input type="button"   class="button" value="确认发布完成" name="sub" id='sub' 
                    onclick="updateTaskState(<{$manage_rows.mId}>, 4, '<{$type|escape}>');" />
                    </td>
                </tr>
         	  <{/if}>
              
              
        
        </tbody>
        </table>
        <{if $type == 'self' || $type == 'admin' }>
            <div  style="margin-left:380px; margin-top:20px;">
            <input type="hidden" value="<{$type}>" name="type" id="type" />
            <input type="hidden"  name="mId" id="mId" value="<{$manage_rows.mId}>">
            <input type="hidden" value="<{$form_act}>" name="act" id="act" />
            <input type="submit"   class="button" value="<{$form_value}> " name="sub_from" id='sub_from' />
            <input type="reset" class="button" value=" 重置 ">
            </div>
        <{/if}>
        
    </form>
</div>
<script>
//验证提交的数据
function checkSubmit() {
	
	var Name = $('#Name').val().replace(/(^\s*)|(\s*$)/g, "");
	
	if (Name == '') {
		alert('任务名称不能为空！');
		$("#Name").focus();
		return false;
	}
	
	return true;
	
}
	
</script>
</body>
</html>